Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix panic in the stored algorithm #221

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

folkertdev
Copy link
Collaborator

@folkertdev folkertdev commented Oct 8, 2024

fixes #218

the logic attempted to copy uninitialized bytes. A panic prevented this from happening, and this commit fixes that panic by only copying the initialized section.

In the future we might, in rust, be able to just come up with a better mechanism around the uninitialized bytes in that window. For now this works fine, I don't think the performance is relevant here.

cc @inahga

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 96.72131% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
test-libz-rs-sys/src/deflate.rs 96.62% 6 Missing ⚠️
Files with missing lines Coverage Δ
zlib-rs/src/adler32/avx2.rs 94.31% <ø> (ø)
zlib-rs/src/deflate/algorithm/stored.rs 98.29% <100.00%> (+6.11%) ⬆️
test-libz-rs-sys/src/deflate.rs 99.21% <96.62%> (-0.27%) ⬇️

... and 5 files with indirect coverage changes

the logic attempted to copy uninitialized bytes. A panic prevented this from happening, and this commit fixes that panic by only copying the initialized section
@folkertdev folkertdev merged commit c9c6d0a into main Oct 9, 2024
18 checks passed
@folkertdev folkertdev deleted the window-copy-uninitialized branch October 9, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OOB panic in deflate_stored()
1 participant